package resolver

// This file will be automatically regenerated based on the schema, any resolver implementations
// will be copied through when generating and any unknown code will be moved to the end.

import (
	"context"
	"fmt"

	"mall/service/wpgql/api/internal/graph/generated"
	// "mall/service/wpgql/api/internal/graph/helper"
	"mall/service/wpgql/api/internal/graph/model"
)

func (r *forumCommentResolver) Likes(ctx context.Context, obj *model.ForumComment, first *int, last *int, after *string, before *string, sorter []*model.ForumCommentReactionConnectionSorter, filter *model.ForumCommentReactionConnectionFilter) (*model.ForumCommentReactionConnection, error) {
	panic(fmt.Errorf("not implemented"))
}

func (r *mutationResolver) CreateForumComment(ctx context.Context, input model.CreateForumCommentInput) (*model.ForumCommentPayload, error) {
	panic(fmt.Errorf("not implemented"))
}

func (r *mutationResolver) UpdateForumComment(ctx context.Context, id string, input model.UpdateForumCommentInput) (*model.ForumCommentPayload, error) {
	panic(fmt.Errorf("not implemented"))
}

func (r *mutationResolver) DeleteForumComment(ctx context.Context, id string) (*model.DeleteForumCommentPayload, error) {
	panic(fmt.Errorf("not implemented"))
}

func (r *mutationResolver) DeleteForumComments(ctx context.Context, filter *model.ForumCommentConnectionFilter) (*model.DeleteForumCommentsPayload, error) {
	panic(fmt.Errorf("not implemented"))
}

func (r *mutationResolver) CreateForumCommentReaction(ctx context.Context, input model.CreateForumCommentReactionInput) (*model.ForumCommentReactionPayload, error) {
	panic(fmt.Errorf("not implemented"))
}

func (r *mutationResolver) UpdateForumCommentReaction(ctx context.Context, id string, input model.UpdateForumCommentReactionInput) (*model.ForumCommentReactionPayload, error) {
	panic(fmt.Errorf("not implemented"))
}

func (r *mutationResolver) DeleteForumCommentReaction(ctx context.Context, id string) (*model.DeleteForumCommentReactionPayload, error) {
	panic(fmt.Errorf("not implemented"))
}

func (r *mutationResolver) DeleteForumCommentReactions(ctx context.Context, filter *model.ForumCommentReactionConnectionFilter) (*model.DeleteForumCommentReactionsPayload, error) {
	panic(fmt.Errorf("not implemented"))
}

func (r *queryResolver) ForumComment(ctx context.Context, id string) (*model.ForumComment, error) {
	panic(fmt.Errorf("not implemented"))
	// dbID := helper.CommentID(id) // 移入rpc
	// mods := helper.GetCommentPreloadMods(ctx) // 部分移入rpc
	// mods = append(mods, dm.CommentWhere.ID.EQ(dbID)) // 移入rpc

	// userId := auth.ForumUserIDFromContext(ctx) // 保留

	// mods = append(mods, dm.CommentWhere.UserID.EQ(userId) // 移入rpc

	// m, err := dm.Comments(mods...).One(ctx, r.db) // 移入rpc
	// if err != nil { // 移入rpc
	// 	log.Error().Err(err).Msg(publicCommentSingleError) // 移入rpc
	// 	return nil, errors.New(publicCommentSingleError) // 移入rpc
	// }
	// return CommentToGraphQL(m), nil // 保留
}

func (r *queryResolver) ForumComments(ctx context.Context, first *int, last *int, after *string, before *string, sorter []*model.ForumCommentConnectionSorter, filter *model.ForumCommentConnectionFilter) (*model.ForumCommentConnection, error) {
	panic(fmt.Errorf("not implemented"))
}

func (r *queryResolver) ForumCommentLike(ctx context.Context, id string) (*model.ForumCommentReaction, error) {
	panic(fmt.Errorf("not implemented"))
}

func (r *queryResolver) ForumCommentLikes(ctx context.Context, first *int, last *int, after *string, before *string, sorter []*model.ForumCommentReactionConnectionSorter, filter *model.ForumCommentReactionConnectionFilter) (*model.ForumCommentReactionConnection, error) {
	panic(fmt.Errorf("not implemented"))
}

// ForumComment returns generated.ForumCommentResolver implementation.
func (r *Resolver) ForumComment() generated.ForumCommentResolver { return &forumCommentResolver{r} }

type forumCommentResolver struct{ *Resolver }
